package top.kiterunner.learning.designpatterns_test.strategy_pattern;

/**
 * AdorynZhao in Tencent-UESTC.
 * Source Code Created on 2017/7/31.
 */
public class ZhaoYunAction {

    public static void main(String[] args) {
        TakenContext tc;

        System.out.println("-----------刚刚到吴国的时候拆第一个-------------");
        tc = new TakenContext(new BackDoorStrategy());
        tc.operate();
        System.out.println("\n\n");

        System.out.println("-----------刘备乐不思蜀了，拆第二个了-------------");
        tc = new TakenContext(new GivenGreenlightStrategy());
        tc.operate();
        System.out.println("\n\n");

        System.out.println("-----------孙权的小兵追了，咋办？拆第三个-------------");
        tc = new TakenContext(new BlockEnemyStrategy());
        tc.operate();
        System.out.println("\n\n");
    }
}
